<?php echo $header; ?>
<!-- MAIN CONTAINER -->
	<div id="ja-container" class="wrap ja-r1">
		<div class="main">	
			<div class="ja-rs2-top">
				<div class="ja-rs2-tl">&nbsp;</div>
				<div class="ja-rs2-tr">&nbsp;</div>
			</div>
			
			<div class="ja-rs2-mid">
				<div class="ja-rs2-ml">
					<div class="ja-rs2-mr clearfix">
						<div id="ja-mainbody" style="width:70%">
						<div id="ja-main" style="width:100%">
								<div class="inner clearfix">	
									<div id="ja-contentwrap" class="ja-r1">
			<!-- CONTENT -->
			<div class="ja-mass ja-mass-top clearfix">
	
			<div class="ja-rs3-top"><div class="ja-rs3-tl">&nbsp;</div><div class="ja-rs3-tr">&nbsp;</div></div>
		
				<div class="ja-rs3-mid"><div class="ja-rs3-ml"><div class="ja-rs3-mr">
					<div class="ja-moduletable moduletable title-orange  clearfix">
						<?php if(!$root_name){?>
						<h3><span><strong class="first-word"><strong><?php echo $heading_title; ?></strong></strong></span></h3>
						<?php }else{?>	
						<h3><span><strong class="first-word"><strong><a href="<?php echo $root_href;?>"><?php echo $root_name;?></a></strong></strong><?php echo $heading_title; ?></span></h3>
						<?php }?>	
							<div class="ja-box-ct clearfix" style="padding-left:20px;padding-right:20px;">
			
								<?php if (!$categories && !$products) { ?>
							    <div><?php echo $text_error; ?></div>
							    <?php } ?>
							    <?php if ($categories) { ?>
							    <table class="list">
							      <?php for ($i = 0; $i < sizeof($categories); $i = $i + 4) { ?>
							      <tr>
							        <?php for ($j = $i; $j < ($i + 4); $j++) { ?>
							        <td width="25%"><?php if (isset($categories[$j])) { ?>
							          <a href="<?php echo $categories[$j]['href']; ?>"><img src="<?php echo $categories[$j]['thumb']; ?>" title="<?php echo $categories[$j]['name']; ?>" alt="<?php echo $categories[$j]['name']; ?>" style="margin-bottom: 3px;" /></a><br />
							          <a href="<?php echo $categories[$j]['href']; ?>"><?php echo $categories[$j]['name']; ?></a>
							          <?php } ?></td>
							        <?php } ?>
							      </tr>
							      <?php } ?>
							    </table>
							    <?php } ?>
							    <div style="clear:both;width:100%;"></div>
							    <?php if ($products) { ?>
							    <div class="sort">
							      <div class="div1">
							      <div class="div2"><?php echo $text_sort; ?>
							        <select name="sort" onchange="location = this.value">
							          <?php foreach ($sorts as $sorts) { ?>
							          <?php if (($sort . '-' . $order) == $sorts['value']) { ?>
							          <option value="<?php echo $sorts['href']; ?>" selected="selected"><?php echo $sorts['text']; ?></option>
							          <?php } else { ?>
							          <option value="<?php echo $sorts['href']; ?>"><?php echo $sorts['text']; ?></option>
							          <?php } ?>
							          <?php } ?>
							        </select>
							        </div>
							      </div>
							      
							    </div>
							    <table>
							    <?php for ($i = 0; $i < sizeof($products); $i=$i+3) { ?>
							    <tr valign="top">
							    <?php for ($j = $i; $j < $i+3; $j++) { ?>
							    <td><?php if (isset($products[$j])) { ?>
								<div class="searchresult">							
								<a href="<?php echo $products[$j]['href']; ?>"><img width="180" height="150" alt="<?php echo $products[$j]['name']; ?>" title="<?php echo $products[$j]['name']; ?>" src="<?php echo $products[$j]['thumb']; ?>" /></a>
								<div class="shadow-small"></div>			
								<div class="namedisplay"><?php echo $products[$j]['name'];?> </div>
											
								</div><!-- end post -->
								</td>
								<?php }?>
								<?php }?>
								
								</tr>
								<?php }?>
								</table>
								<div style="clear:both;width:100%;"></div>
								<div class="pagination"><?php echo $pagination; ?></div>
								<?php }?>
					</div></div></div></div></div>
		
					<div class="ja-rs3-bot"><div class="ja-rs3-bl">&nbsp;</div><div class="ja-rs3-br">&nbsp;</div></div>
					</div>
					</div>
				</div>
			</div>
	<!-- //CONTENT -->
			</div>
		<!-- RIGHT COLUMN-->
		<?php echo $column_right; ?>
		<!-- END RIGHT COLUMN--> 
	</div></div></div>
	</div>
	</div>
<?php echo $footer; ?> 